package com.jlh.viewer;

import difflib.Delta;
import difflib.DiffUtils;
import difflib.Patch;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.util.List;
import java.util.stream.Collectors;

/**
 * com.jlh.viewer
 *
 * @author mymx.jlh
 * @date 2017/12/10 10:58
 */
public class diffFile {
    public static void main(String[] args) throws FileNotFoundException {

        BufferedReader reader1 = new BufferedReader(new FileReader ("C:\\D-drive-78765\\template\\CommodityDOMapper.xml"));;
        BufferedReader reader2 = new BufferedReader(new FileReader ("C:\\D-drive-78765\\template\\CommodityDOMapper2.xml"));;
        List<String> line1 = reader1.lines().collect(Collectors.toList());
        List<String> line2 = reader2.lines().collect(Collectors.toList());
        Patch patch = DiffUtils.diff(line1,line2);

    }
}
